import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import 'vant/lib/index.css'; // 全局引入样式
import {
    Tabbar,
    TabbarItem,
    Search,
    Swipe, SwipeItem,
    Tab, Tabs ,
 Image as VanImage,
    Icon,
    Tag,
    NavBar,
    FloatingBubble,
    Notify,
    Button
} from 'vant';
import axios from 'axios'
import config from "./config/config"
axios.defaults.baseURL = config.baseUrl
const app = createApp(App);
app.use(Button)
app.use(NavBar)
app.use(Notify)
app.use(FloatingBubble)
app.use(Search)
app.use(Tag)
app.use(Icon);
app.use(VanImage)
app.use(Tabbar).use(TabbarItem)
app.use(Swipe);
app.use(SwipeItem)
app.use(Tab);
app.use(Tabs);
// 方式一. 通过 app.use 注册
// 注册完成后，在模板中通过 <van-button> 或 <VanButton> 标签来使用按钮组件
app.provide('$axios',axios)

app.use(router).mount('#app')
